require("../../@babel/runtime/helpers/Arrayincludes"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/wechat-order-popup/index" ], {
    "7b8f": function(e, t, n) {
        (function(e) {
            var r = n("4ea4").default;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = r(n("a34a")), a = r(n("ded3")), i = r(n("c973")), u = n("e820"), c = n("48b8"), d = n("24a3"), l = n("fd0e"), s = n("05dc"), f = n("cee8"), m = n("523c"), v = n("665c"), p = n("b4f1"), g = n("0f65"), h = r(n("5a0c")), _ = n("0490"), w = n("3be3"), P = n("8f12"), b = {
                setup: function(t, n) {
                    var r = n.emit, b = (0, v.useStore)(), y = (0, l.reactive)({
                        isShow: !1,
                        isLoading: !0,
                        previewSrc: "",
                        bgTheme: "gray-theme",
                        fromConfirmPage: !1,
                        fromOrderPage: !1,
                        isQuotation: !1,
                        smallHeightScreen: !1
                    }), x = (0, v.useState)(), O = x.coupeConfig, I = x.systemInfo, C = (0, l.computed)(function() {
                        var e;
                        return (null === (e = O.value) || void 0 === e ? void 0 : e.inviteDriverConfig) || {};
                    }), k = null, S = {
                        orderUuid: "",
                        secretOrderUuid: "",
                        orderParams: {},
                        orderInfo: {},
                        totalPrice: 0,
                        fromPage: ""
                    }, D = null;
                    (0, l.onMounted)(function() {
                        var e, t, n;
                        null === (e = (0, l.getCurrentInstance)()) || void 0 === e || e.proxy;
                        var r = null === (t = I.value) || void 0 === t ? void 0 : t.windowWidth, o = null === (n = I.value) || void 0 === n ? void 0 : n.screenHeight;
                        Number((r / o).toFixed(3)) > .5 && (y.smallHeightScreen = !0);
                    });
                    var U = (0, l.computed)(function() {
                        var e = 0;
                        return y.fromConfirmPage && (e = (0, m.useCouponInfo)().originalPrice), y.fromOrderPage && (e = S.totalPrice), 
                        (0, c.fenToYuan)(e || 0);
                    });
                    var N = (0, l.ref)(!1);
                    function T(e) {
                        return E.apply(this, arguments);
                    }
                    function E() {
                        return (E = (0, i.default)(o.default.mark(function t(n) {
                            var r, c, l, m, v, p, g, h;
                            return o.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return W(), t.next = 3, _.coupeConfigGot.promise;

                                  case 3:
                                    (0, f.$loading)(), e.$on(u.PAINTER_DONE, function() {
                                        var e = (0, i.default)(o.default.mark(function e(t) {
                                            var n, r, a, i, u, c, l, s, m;
                                            return o.default.wrap(function(e) {
                                                for (;;) switch (e.prev = e.next) {
                                                  case 0:
                                                    if (!(r = null === (n = t.e) || void 0 === n ? void 0 : n.path)) {
                                                        e.next = 15;
                                                        break;
                                                    }
                                                    if (N.value = !0, "previewSrc" === t.key && (y.previewSrc = r, a = y.fromConfirmPage ? M() : q(), 
                                                    i = a.time, u = a.addr, c = a.std, (0, d.updateShareImgData)({
                                                        time: i,
                                                        addr: u,
                                                        std: c
                                                    }), $(d.shareImgData)), "shareImgSrc" !== t.key) {
                                                        e.next = 14;
                                                        break;
                                                    }
                                                    if (S.secretOrderUuid) {
                                                        e.next = 11;
                                                        break;
                                                    }
                                                    return e.next = 8, D;

                                                  case 8:
                                                    l = e.sent, s = l.order_uuid_secret, S.secretOrderUuid = s;

                                                  case 11:
                                                    m = {
                                                        title: "我有一笔拉货订单，邀请你接单，快来看看！",
                                                        path: "/pages/share-order-info/index?orderUuid=".concat(S.secretOrderUuid, "&ref=").concat(P.COMMON.DRIVER_REF),
                                                        imageUrl: r
                                                    }, (0, d.updateShareContent)(m), f.$loading.hide();

                                                  case 14:
                                                    "orderImgSrc" === t.key && F(r);

                                                  case 15:
                                                  case "end":
                                                    return e.stop();
                                                }
                                            }, e);
                                        }));
                                        return function(t) {
                                            return e.apply(this, arguments);
                                        };
                                    }()), y.fromConfirmPage = "confirmPage" === S.fromPage, y.fromOrderPage = "orderPage" === S.fromPage, 
                                    l = null === (r = S.orderInfo) || void 0 === r ? void 0 : r.business_type, y.isQuotation = !(null === (c = S.orderParams) || void 0 === c || !c.quotation_price) || 11 === l, 
                                    m = y.fromConfirmPage ? M() : q(), v = m.time, p = m.addr, g = m.std, h = m.price, 
                                    (0, d.updatePreviewImgData)({
                                        time: v,
                                        addr: p,
                                        std: g,
                                        price: h,
                                        isQuotation: y.isQuotation
                                    }), $(d.previewImgData), S.secretOrderUuid || j(n.orderUuid), (0, s.statistics)("wxshare_expo", (0, 
                                    a.default)({}, V()));

                                  case 14:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }))).apply(this, arguments);
                    }
                    function $(e) {
                        r("painter-update", {
                            imgDraw: e
                        });
                    }
                    function H() {
                        var t, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "cancel";
                        y.isShow = !1, null === (t = k) || void 0 === t || t({
                            type: n
                        }), e.$off(u.PAINTER_DONE);
                    }
                    function Q() {
                        return (Q = (0, i.default)(o.default.mark(function e() {
                            return o.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return e.next = 2, (0, c.delay)(.1);

                                  case 2:
                                    H("ok"), L("微信好友");

                                  case 4:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))).apply(this, arguments);
                    }
                    function R() {
                        return (R = (0, i.default)(o.default.mark(function e() {
                            var t, n, r, a, i, u, c, l, s;
                            return o.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    if (N.value) {
                                        e.next = 2;
                                        break;
                                    }
                                    return e.abrupt("return");

                                  case 2:
                                    return (0, f.$loading)(), (t = d.orderImgData).random = new Date().getTime(), n = "o=".concat(S.orderUuid, "&ref=").concat(P.COMMON.DRIVER_REF), 
                                    e.next = 8, (0, p.getDriverQrPath)({
                                        scene: n,
                                        page: "pages/order-share/take"
                                    });

                                  case 8:
                                    r = e.sent, (a = r.fileLink) || (0, f.$toast)({
                                        title: "获取小程序码异常"
                                    }), i = y.fromConfirmPage ? M() : q(), u = i.time, c = i.addr, l = i.std, s = i.price, 
                                    (0, d.updatePreviewImgData)({
                                        time: u,
                                        addr: c,
                                        std: l,
                                        price: s,
                                        isQuotation: y.isQuotation,
                                        qrPath: a
                                    }), $(t), L("保存图片");

                                  case 15:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))).apply(this, arguments);
                    }
                    function F(t) {
                        e.saveImageToPhotosAlbum({
                            filePath: t,
                            success: function() {
                                (0, f.$toast)({
                                    title: "已保存到相册"
                                }), (0, s.statistics)("wx_picture_status", {
                                    picture_is_success: 1,
                                    page_from: B()
                                });
                            },
                            fail: function(e) {
                                (0, f.$toast)({
                                    title: "保存失败，请在设置中打开授权后重试"
                                }), (0, s.statistics)("wx_picture_status", {
                                    picture_is_success: 2,
                                    page_from: B()
                                }), null == e || e.errCode;
                            },
                            complete: function() {
                                var e = (0, i.default)(o.default.mark(function e() {
                                    return o.default.wrap(function(e) {
                                        for (;;) switch (e.prev = e.next) {
                                          case 0:
                                            return f.$loading.hide(), e.next = 3, (0, c.delay)(2);

                                          case 3:
                                            H("ok");

                                          case 4:
                                          case "end":
                                            return e.stop();
                                        }
                                    }, e);
                                }));
                                return function() {
                                    return e.apply(this, arguments);
                                };
                            }()
                        });
                    }
                    function j(e) {
                        return A.apply(this, arguments);
                    }
                    function A() {
                        return (A = (0, i.default)(o.default.mark(function e(t) {
                            return o.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    D = (0, p.getOrderUuidSecret)({
                                        order_uuid: t
                                    });

                                  case 1:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))).apply(this, arguments);
                    }
                    function M() {
                        var e = G(), t = J(), n = function() {
                            var e, t, n, r, o, a, i, u, c, d = (0, v.useGetters)(), l = d.selectedVehicle, s = d.selectedCar, f = (0, 
                            v.useState)().selectedStd, m = S.orderParams, p = m.goods_detail, h = m.follower_num, _ = null === (e = l.value) || void 0 === e ? void 0 : e.name, w = null === (t = s.value.map(function(e) {
                                return e.short_name;
                            })) || void 0 === t ? void 0 : t.join("/"), P = w ? " | ".concat(w) : "", b = null != p && null !== (n = p.tag) && void 0 !== n && n.weight ? " | ".concat((0, 
                            g.roundFun)(null == p || null === (r = p.tag) || void 0 === r ? void 0 : r.weight, 1)).concat(null == p || null === (o = p.tag) || void 0 === o || null === (a = o.weight_show) || void 0 === a ? void 0 : a.enum_name) : "", y = null != p && null !== (i = p.tag) && void 0 !== i && i.volume ? " | ".concat((0, 
                            g.roundFun)(null == p || null === (u = p.tag) || void 0 === u ? void 0 : u.volume, 1), "方") : "", x = null !== (c = f.value.find(function(e) {
                                return "带尾板" === e.name;
                            })) && void 0 !== c && c.name ? " | 带尾板" : "", O = h > 0 ? " | ".concat(h, "人跟车") : "";
                            return "".concat(_).concat(P).concat(b).concat(y).concat(x).concat(O);
                        }();
                        return {
                            time: e,
                            addr: t,
                            std: n,
                            price: U.value
                        };
                    }
                    function q() {
                        S.orderInfo;
                        var e = G(), t = J(), n = function() {
                            var e, t, n, r, o, a, i, u, c, d, l, s, f = [], m = [], v = S.orderInfo;
                            null == v || null === (e = v.orig_std_tag_item) || void 0 === e || e.forEach(function(e) {
                                "carriage" === e.type && (f = e.tag), "others" === e.type && (m = e.tag);
                            });
                            var p = (null == v ? void 0 : v.vehicle_type_name) || "", h = f.length > 0 ? " | ".concat(f.join("/")) : "", _ = null != v && null !== (t = v.order_goods) && void 0 !== t && null !== (n = t.tag) && void 0 !== n && n.weight ? " | ".concat((0, 
                            g.roundFun)(null == v || null === (r = v.order_goods) || void 0 === r || null === (o = r.tag) || void 0 === o ? void 0 : o.weight, 1)).concat(null == v || null === (a = v.order_goods) || void 0 === a || null === (i = a.tag) || void 0 === i || null === (u = i.weight_show) || void 0 === u ? void 0 : u.enum_name) : "", w = null != v && null !== (c = v.order_goods) && void 0 !== c && null !== (d = c.tag) && void 0 !== d && d.volume ? " | ".concat((0, 
                            g.roundFun)(null == v || null === (l = v.order_goods) || void 0 === l || null === (s = l.tag) || void 0 === s ? void 0 : s.volume, 1), "方") : "", P = m.length > 0 && m.includes("带尾板") ? " | 带尾板" : "", b = (null == v ? void 0 : v.follower_num) > 0 ? " | ".concat(null == v ? void 0 : v.follower_num, "人跟车") : "";
                            return "".concat(p).concat(h).concat(_).concat(w).concat(P).concat(b);
                        }();
                        return {
                            time: e,
                            addr: t,
                            std: n,
                            price: U.value
                        };
                    }
                    function G() {
                        var e, t, n, r, o, a = null, i = null;
                        y.fromConfirmPage && (a = (null === (e = S.orderParams) || void 0 === e ? void 0 : e.period_start) || (null === (t = S.orderParams) || void 0 === t ? void 0 : t.order_time), 
                        i = null === (n = S.orderParams) || void 0 === n ? void 0 : n.period_end), y.fromOrderPage && (a = null === (r = S.orderInfo) || void 0 === r ? void 0 : r.order_time, 
                        i = null === (o = S.orderInfo) || void 0 === o ? void 0 : o.end_datetime);
                        var u = "";
                        if (a && i) {
                            var d = h.default.unix(a).format("HH:mm"), l = h.default.unix(i).format("HH:mm");
                            u = "".concat((0, c.formatTipsOrderTime)(a)).concat(d, "-").concat(l);
                        } else if (a && !i) {
                            var s = h.default.unix(a).format("HH:mm");
                            u = "".concat((0, c.formatTipsOrderTime)(a)).concat(s);
                        }
                        return "".concat(u, " 用车");
                    }
                    function J() {
                        var e, t = [];
                        y.fromConfirmPage && (t = b.state.address || []), y.fromOrderPage && (t = (null === (e = S.orderInfo) || void 0 === e ? void 0 : e.addr_info) || []);
                        var n = t[0], r = t[t.length - 1];
                        return [ "".concat((0, c.formatCityName)(null == n ? void 0 : n.city_name), " ").concat((0, 
                        c.formatDistrictName)(null == n ? void 0 : n.district_name)) || "", "".concat((0, 
                        c.formatCityName)(null == r ? void 0 : r.city_name), " ").concat((0, c.formatDistrictName)(null == r ? void 0 : r.district_name)) || "" ];
                    }
                    function V() {
                        var e = "", t = "", n = (0, v.useGetters)().commonStatisticsState.value.frame_city, r = "", o = "", a = B();
                        if (y.fromConfirmPage) {
                            var i, u, c, d = (0, v.useGetters)().selectedVehicle;
                            e = null === (i = d.value) || void 0 === i ? void 0 : i.name, t = null === (u = d.value) || void 0 === u ? void 0 : u.order_vehicle_id, 
                            r = (0, w.checkUseTimeIsNow)() ? "现在用车" : "预约用车", o = null !== (c = S.orderParams) && void 0 !== c && c.quotation_price ? "议价用车" : "快车";
                        }
                        if (y.fromOrderPage) {
                            var l = S.orderInfo || {};
                            e = l.vehicle_type_name, t = l.order_vehicle_id, r = l.is_subscribe ? "预约用车" : "现在用车", 
                            o = 11 === l.business_type ? "议价用车" : "快车";
                        }
                        return {
                            vehicle_select_name: e,
                            vehicle_select_id: t,
                            frame_city: n,
                            business_type: 5,
                            order_type: r,
                            car_type: o,
                            page_from: a,
                            order_uuid: S.orderUuid
                        };
                    }
                    function L(e) {
                        (0, s.statistics)("wxshare_click", (0, a.default)((0, a.default)({}, V()), {}, {
                            module_name: e
                        }));
                    }
                    function B() {
                        var e = "";
                        (y.fromConfirmPage && (e = "确认订单页"), y.fromOrderPage) && (e = 9 === (S.orderInfo || {}).send_type ? "等待应答页_捂单中" : "等待应答页_不捂单");
                        return e;
                    }
                    function W() {
                        y.previewSrc = "", y.fromConfirmPage = !1, y.fromOrderPage = !1, y.isQuotation = !1;
                    }
                    return Object.assign({
                        data: y,
                        inviteDriverConfig: C,
                        shareAction: function() {
                            return Q.apply(this, arguments);
                        },
                        saveImage: function() {
                            return R.apply(this, arguments);
                        },
                        closeAction: function() {
                            H(), L("关闭");
                        }
                    }, {
                        open: function() {
                            var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : S;
                            return S = e, new Promise(function(t) {
                                y.isShow = !0, y.isLoading = !0, k = t, T(e);
                            });
                        }
                    });
                }
            };
            b.components = Object.assign({
                BottomPopup: function() {
                    Promise.all([ n.e("common/vendor"), n.e("components/bottom-popup/index") ]).then(function() {
                        return resolve(n("54a1"));
                    }.bind(null, n)).catch(n.oe);
                }
            }, b.components);
            var y = b;
            t.default = y;
        }).call(this, n("543d").default);
    },
    "90da": function(e, t, n) {
        n.r(t);
        var r = n("7b8f"), o = n.n(r);
        for (var a in r) [ "default" ].indexOf(a) < 0 && function(e) {
            n.d(t, e, function() {
                return r[e];
            });
        }(a);
        t.default = o.a;
    },
    9642: function(e, t, n) {},
    "9bd6": function(e, t, n) {
        n.d(t, "b", function() {
            return r;
        }), n.d(t, "c", function() {
            return o;
        }), n.d(t, "a", function() {});
        var r = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    a3f0: function(e, t, n) {
        var r = n("9642");
        n.n(r).a;
    },
    ad71: function(e, t, n) {
        n.r(t);
        var r = n("9bd6"), o = n("90da");
        for (var a in o) [ "default" ].indexOf(a) < 0 && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(a);
        n("a3f0");
        var i = n("f0c5"), u = Object(i.a)(o.default, r.b, r.c, !1, null, "61e9df67", null, !1, r.a, void 0);
        t.default = u.exports;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/wechat-order-popup/index-create-component", {
    "components/wechat-order-popup/index-create-component": function(e, t, n) {
        n("543d").createComponent(n("ad71"));
    }
}, [ [ "components/wechat-order-popup/index-create-component" ] ] ]);